<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .father {
      width: 300px;
      height: 100px;
      border: 1px solid #f00;
      display: flex;
      background: khaki;
    }

    .son:nth-child(1) {
      width: 150px;
      /* 控制某个盒子不收缩 */
      flex-shrink: 0;
      background-color: hotpink;
    }

    .son:nth-child(2) {
      flex: 1 1;
      background-color: #ccc;
    }


    .box {
      width: 200px;
      background-color: yellowgreen;
    }
  </style>
</head>

<body>
  <h1>如果不希望盒子被收缩，flex-shrink: 0;</h1>
  <div class="father">
    <div class="son">11</div>
    <div class="son">
      <span>22</span>
      <div class="box">盒子</div>
    </div>
  </div>
</body>

</html>